<%-- 
    Document   : userheader
    Created on : Jul 16, 2013, 6:50:56 PM
    Author     : Thanh
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <body>
        <div class="header">
            <h1 class="header">blogger.abc.com</h1>
            <br/>
            
            <%
                        String user = (String) session.getAttribute("user");
                        if (user == null) {
                            String unlogin = "<a href='register.jsp'>[Đăng ký]</a> | <a href='login.jsp'>[Đăng nhập]</a>";
                            out.print(unlogin);
                        } else {
                            String logined = "Chàn bạn " + session.getAttribute("user") + "! " + "<a href='#'>[Trang cá nhân]</a> | <a href='LogoutServlet'>[Đăng xuất]";
                            out.print(logined);
                        }
            %>

            <br/>
            <a href="index.jsp">Trang chủ</a> | <a href="index.jsp">Giới thiệu</a> | <a href="index.jsp">Liên hệ</a>
        </div>
    </body>
</html>
